package com.zzyl.serve.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.serve.dto.MemberLoginDto;
import com.zzyl.serve.service.IFamilyMemberService;
import com.zzyl.serve.vo.MemberLoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "老人家属管理")
@RestController
@RequestMapping("/member/user")
public class FamilyMemberController extends BaseController
{
    @Autowired
    private IFamilyMemberService familyMemberService;

    @PostMapping("/login")
    @ApiOperation("家属小程序登录")
    public AjaxResult login(@RequestBody MemberLoginDto loginDto){
        MemberLoginVo vo = familyMemberService.login(loginDto);
        return AjaxResult.success(vo);
    }
}